import {defineStore} from "pinia";

export const useUserStore = defineStore('user', {
	state: () => {
		return {
			token: undefined,
			username: undefined,
			publicKey: undefined,
			uuid: undefined
		}
	},
	actions: {
		setToken(token, username) {
			this.token = token
			this.username = username
		},
		setPublicKey(publicKey) {
			this.publicKey = publicKey
		},
		setUuid(uuid) {
			this.uuid = uuid
		},
	},
	persist: {
		enabled: true,
	}
})